﻿@model ArticleControllerModel.Detail
<div class="page">
    <div class="pageContent">
        <form method="POST" action="/game/article/detail/@(Model.Article.Id)" class="pageForm required-validate" onsubmit="return validateCallback(this, dialogAjaxDone);">
        <div class="pageFormContent">
            <div>
                <p>
                    <label>
                        游 戏：
                    </label>
                    <select name="GameId">
                        @foreach (var o in Model.Games)
                        {
                            <option value ="@(o.Id)" @(Model.Article.GameId == o.Id ? "selected=selected" : string.Empty)>@(o.Name)</option>
                        }
                    </select>
                </p>
                <p>
                    <label>
                        分 类：</label>
                    <select name="Category">
                        @foreach (var o in GameArticle.CategoryDic)
                        {
                            <option value ="@(o.Key)" @(Model.Article.Category == o.Key ? "selected=selected" : string.Empty)>@(o.Value)</option>
                        }
                    </select>
                </p>
                <p>
                    <label>
                        状 态：</label>
                    <select name="Status">
                        @foreach (var o in GameArticle.StatusDic)
                        {
                            <option value ="@(o.Key)" @(Model.Article.Status == o.Key ? "selected=selected" : string.Empty)>@(o.Value)</option>
                        }
                    </select>
                </p>
                <p>
                    <label>
                        标 识：
                    </label>
                    @foreach (var o in GameArticle.FlagDic)
                    {
                        <span style="height: 20px; line-height: 20px;">
                            <input type="checkbox" name="flags" value="@(o.Key)" @((Model.Article.Flag & o.Key) == o.Key ? "checked=checked" : string.Empty) />
                            <span style="padding: 0 5px 5px;">@o.Value </span></span>
                    }
                </p>
                <dl class="nowrap">
                    <dt>标 题：</dt>
                    <dd>
                        <input type="text" name="Title" value="@(Model.Article.Title)" class="required"/>
                    </dd>
                </dl>
                <dl class="nowrap">
                    <dt>子标题：</dt>
                    <dd>
                        <input type="text" name="SubTitle" value="@(Model.Article.SubTitle)" class="required"/>
                    </dd>
                </dl>
                <dl class="nowrap">
                    <dt>摘 要：</dt>
                    <dd>
                        <textarea rows="2" cols="80" name="Summary">@(Model.Article.Summary)</textarea></dd>
                </dl>
                <div>
                    <label>
                        内 容：
                    </label>
                    <div>
                        <textarea cols="100" rows="14" name="Content" class="editor" style="display: none;">@(Model.Article.Content)</textarea>
                    </div>
                </div>
            </div>
        </div>
        <div class="formBar">
            <ul>
                <li>
                    <div class="buttonActive">
                        <div class="buttonContent">
                            <button type="button" onclick="this.form.onsubmit();">
                                保存</button></div>
                    </div>
                </li>
                <li>
                    <div class="button">
                        <div class="buttonContent">
                            <button type="button" onclick="$.pdialog.closeCurrent();">
                                取消</button></div>
                    </div>
                </li>
            </ul>
        </div>
        </form>
    </div>
</div>
